<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<script
	src="${pageContext.request.contextPath}/resources/js/jquery.validate.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/Contact/Edit.js"></script>
<script src="${pageContext.request.contextPath}/resources/js/hogan.js"></script>
<script
	src="${pageContext.request.contextPath}/resources/js/typeahead.min.js"
	type="text/javascript"></script>

<legend>
	<fmt:message key="form.editContact.title" />
</legend>
<div id="formsContent">
	<!-- Form container -->
	<form:form id="contactForm" commandName="contactDTO"
		class="form-horizontal" autocomplete="off" method="POST"
		action="newContact">
		<form:hidden path="viewType" id="viewType" name="viewType" />
		<form:hidden path="parentId" id="parentId" name="parentId" />
		<form:hidden path="parentName" id="parentName" name="parentName" />
		<form:hidden path="id" value="${id}" id="contactId" />
		<div class="row-fluid">
			<div class="span12">
				<fieldset>
					<legend>
						<fmt:message key="form.contact.RequiredInformation" />
					</legend>
					<div class="row-fluid">

						<div class="span6 bgcolor">
							<div class="control-group">
								<label class="control-label" for="input"><fmt:message
										key="form.contact.FirstName" /> <span style="color: red;">*</span></label>
								<div class="controls">
									<form:input path="fName" id="fName" name="fName" value=""
										maxlength="100" placeholder="" class="required" />
									<label><span class="help-inline"></span></label>
								</div>
							</div>
						</div>

						<div class="span6 bgcolor">
							<div class="control-group">
								<label class="control-label" for="input"><fmt:message
										key="form.contact.companyName" /> <span style="color: red;">*</span></label>
								<div class="controls">
									<form:input placeholder="Search Here for companies"
										name="parentCompany" id="parentCompany" path="parentCompany"
										class="required" />
									<label><span class="help-inline"></span></label>
								</div>
							</div>
						</div>

					</div>
					<div class="row-fluid">
						<div class="span6 bgcolor">
							<div class="control-group">
								<label class="control-label" for="input" class="required"><fmt:message
										key="form.contact.LastName" /></label>
								<div class="controls">
									<form:input path="lName" id="lName" name="lName" value=""
										maxlength="100" placeholder="" />
									<label><span class="help-inline"></span></label>
								</div>
							</div>
						</div>
						<div class="span6 bgcolor">
							<div class="control-group">
								<label class="control-label" for="input"><fmt:message
										key="form.contact.Phone" /><span style="color: red;">*</span></label>
								<div class="controls">
									<form:input path="phone" id="phone" name="phone" value=""
										maxlength="100" placeholder="" />
									<label><span class="help-inline"></span></label>
								</div>
							</div>
						</div>
					</div>
				</fieldset>

				<fieldset>
					<legend>
						<fmt:message key="form.contact.ContactInformation" />
					</legend>
					<div class="row-fluid">
						<div class="span6 bgcolor">
							<div class="control-group">
								<label class="control-label" for="input"><fmt:message
										key="form.account.Email" /></label>
								<div class="controls">
									<form:input path="email" id="email" name="email" value=""
										maxlength="100" placeholder="" />
									<label><span class="help-inline"></span></label>
								</div>
							</div>
						</div>
						<div class="span6 bgcolor">
							<div class="control-group">
								<label class="control-label" for="input"><fmt:message
										key="form.contact.Title" /></label>
								<div class="controls">
									<form:input path="title" id="title" name="title" value=""
										maxlength="100" placeholder="" />
									<label><span class="help-inline"></span></label>
								</div>
							</div>
						</div>
					</div>
					<div class="row-fluid">
						<div class="span6 bgcolor">
							<div class="control-group">
								<label class="control-label" for="input" class="required"><fmt:message
										key="form.contact.Mobile" /></label>
								<div class="controls">
									<form:input path="mobile" id="mobile" name="mobile" value=""
										maxlength="100" placeholder="" />
									<label><span class="help-inline"></span></label>
								</div>
							</div>
						</div>
					</div>
				</fieldset>
			</div>
		</div>
		<div class="form-actions">
			<button id="saveButton" type="submit" class="btn btn-primary">
				<fmt:message key="form.editContact.btnEdit" />
			</button>
			<button id="cancelButton" type="button" class="btn">
				<fmt:message key="form.cancel" />
			</button>
		</div>
	</form:form>
</div>
<input type="hidden" name="fNameRequired" id="fNameRequired"
	value="<fmt:message key="error.contact.fNameRequired"/>" />
<input type="hidden" name="companyRequired" id="companyRequired"
	value="<fmt:message key="error.contact.companyNameRequired"/>" />
<input type="hidden" name="phoneRequired" id="phoneRequired"
	value="<fmt:message key="error.contact.phoneRequired"/>" />
<input type="hidden" name="numbersFormat" id="numbersFormat"
	value="<fmt:message key="error.numbers"/>" />
<input type="hidden" name="phoneChecked" id="phoneChecked"
	value="<fmt:message key="error.lead.phoneChecked"/>" />
<input type="hidden" name="emailFormat" id="emailFormat"
	value="<fmt:message key="error.email"/>" />